<script>
    var idempleado;
    
    $(document).ready(function() {
        $("#window").kendoWindow({
        width: "300px",
        title: "",
        modal:true,
        visible:false,
        resizable: false
        });
    });
    
    function eliminarjs(id){
        var window=$("#window").data("kendoWindow");
        window.center();
        window.open();
        idempleado=id;
    }
    
    function cancelar(){
        
        var window = $("#window").data("kendoWindow");
        window.close();
        
    }
</script>
<div id="window"><p>¿Esta seguro que desea Borrar el Empleado?</p>
    <a class="k-button"href="javascript:;" onclick="window.location.href=BASE_URL+'listar_empleado/editarEmpleado/'+idempleado+'/0'">Aceptar</a>
    <a class="k-button"onclick="cancelar()">Cancelar</a>
</div>
<fieldset style="width: 1000px;">
    <h1>Administracion Empleados</h1>
    <p style="margin: 20px 0 20px 0;">Lista todos los Empleados existentes, permite editar y dar de baja.</p>
  
    <table id='tabla' class='table' cellspacing="0">
        <caption style="font-size: 13px; text-align: left; margin-bottom: 5px;"><?php echo anchor('http://www.panambi.com/listar_empleado_baja/index/','Ver Empleados Dado de Baja'); ?></caption>
 
        <tr>
            <th class="elthini"><a class='bold' href="javascript:$('#tabla').sortTable({onCol: 1, keepRelationships: true, sortType: 'numeric'})" style="color:#333333;">Dni</a></th>
            <th class="elth"><a class='bold' href="javascript:$('#tabla').sortTable({onCol: 2, keepRelationships: true, sortType: 'numeric'})" style="color:#333333;">Cuil</a></th>
            <th class="elth"><a class='bold' href="javascript:$('#tabla').sortTable({onCol: 3, keepRelationships: true})" style="color:#333333;">Nombre</a></th>
            <th class="elth"><a class='bold' href="javascript:$('#tabla').sortTable({onCol: 4, keepRelationships: true})" style="color:#333333;">Apellido</a></th>
            <th class="elth"><a class='bold' href="javascript:$('#tabla').sortTable({onCol: 5, keepRelationships: true})" style="color:#333333;">Fecha Nacimiento</a></th>
            <th class="elth"><a class='bold' href="javascript:$('#tabla').sortTable({onCol: 6, keepRelationships: true})" style="color:#333333;">Fecha Alta</a></th>
            <th class="elth">Editar Empleado</th>
            <th class="elthfin">Borrar Empleado</th>
        </tr>
        <?php foreach($empleados as $i=>$id){ ?>
        <tr>
        <td class="eltd"><?php echo $id['idEmpleado'] ?></td>
        <td class="eltd"><?php echo $id['cuit'] ?></td>
        <td class="eltd"><?php echo $id['nombre'] ?></td>
        <td class="eltd"><?php echo $id['apellido'] ?></td>
        <td class="eltd"><?php echo $id['fechaNac'] ?></td>
        <td class="eltd"><?php echo $id['fechaAl'] ?></td>       
<!--        <td class="eltd"><INPUT id="editar" name="editar" title="Editar" alt="editar" src="<?php echo base_url() ?>css/images/edit.png" type="image" value="<?php echo $id['idEmpleado'] ?>"/></td>-->
        <td class="eltd"><a href="<?php echo base_url().'listar_empleado/editarEmpleado/'.$id['idEmpleado'].'/1'?>" title="Editar" ><img src="<?php echo base_url() ?>css/images/edit.png" alt="" /></a></td>
<!--        <td class="eltd"><INPUT name="eliminar" title="Eliminar" alt="eliminar" src="<?php echo base_url() ?>css/images/delete.png" type="image" value="<?php echo $id['idEmpleado'] ?>"/></td>-->
        <td class="eltd"><a href="javascript:;" title="Eliminar"  onclick="eliminarjs('<?php echo $id['idEmpleado']?>')"><img src="<?php echo base_url() ?>css/images/delete.png" alt="" /></a></td>
         </tr>
        <?php }?>      
    </table>
   
</fieldset>  